<template>
	<view class="project_wt_tabs">
		<u-tabs 
			:list="list" 
			:is-scroll="false" 
			:current="currentIndex" 
			@change="change"
			font-size="30"
			inactive-color="#626262"
			bar-height="5"
			:bar-style="{
				backgroundColor:'#5c77ff',
				marginTop:'10px',
				transitionProperty: 'font-size background-color, color',
			}"
			:active-item-style="{
				color:'#5c77ff',
				fontSize:'35rpx', 
			}">
		</u-tabs>
	</view>
</template>

<script>
export default{  //项目推进item组件
	name:"Project_wt_tabs",
	props:{
		list:{  //tabs数据数组
			type:Array, 
			default:[],
		},
		current:{
			default:0
		}
	},
	data(){
		return{
			
		}
	},
	computed:{
		currentIndex:{
			get(){
				return this.current
			},
			set(val){
				
			}
		}
	},
	methods:{
		change(index) {  //当标签被点击时改变标签并且触发change属性
			this.currentIndex = index;
			this.$emit("change",index);
		},
	},
	created(){
		
	},
}
</script>

<style lang="scss" scoped>
.project_wt_tabs{
	width: 100%;
}
</style>
